<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="description" content="Creative - Bootstrap 3 Responsive Admin Template">
  <meta name="author" content="GeeksLabs">
  <meta name="keyword" content="Creative, Dashboard, Admin, Template, Theme, Bootstrap, Responsive, Retina, Minimal">
  <link rel="shortcut icon" href="img/favicon.png">

  <title>Basic Table | Creative - Bootstrap 3 Responsive Admin Template</title>

  <!-- Bootstrap CSS -->
  <link href="css/bootstrap.min.css" rel="stylesheet">
  <!-- bootstrap theme -->
  <link href="css/bootstrap-theme.css" rel="stylesheet">
  <!--external css-->
  <!-- font icon -->
  <link href="css/elegant-icons-style.css" rel="stylesheet" />
  <link href="css/font-awesome.min.css" rel="stylesheet" />
  <!-- Custom styles -->
  <link href="css/style.css" rel="stylesheet">
  <link href="css/style-responsive.css" rel="stylesheet" />

  <!-- HTML5 shim and Respond.js IE8 support of HTML5 -->
  <!--[if lt IE 9]>
      <script src="js/html5shiv.js"></script>
      <script src="js/respond.min.js"></script>
      <script src="js/lte-ie7.js"></script>
    <![endif]-->

    <!-- =======================================================
      Theme Name: NiceAdmin
      Theme URL: https://bootstrapmade.com/nice-admin-bootstrap-admin-html-template/
      Author: BootstrapMade
      Author URL: https://bootstrapmade.com
    ======================================================= -->
</head>

<body>
  <!-- container section start -->
  <section id="container" class="">
    <!--header start-->
    <div th:replace="~{commons/commons::topbar}"></div>
    <!--header end-->

    <!--sidebar start-->
    <div th:replace="~{commons/commons::sidebar}"></div>
    <!--sidebar end-->

    <!--main content start-->
    <section id="main-content">
      <section class="wrapper">
        <div class="row">
          <div class="col-lg-12">
            <h3 class="page-header"><i class="fa fa-table"></i> 表单</h3>
            <ol class="breadcrumb">
              <li><i class="fa fa-home"></i><a href="../index.html">主页</a></li>
              <li><i class="fa fa-table"></i>库存表</li>
              <li><i class="fa fa-th-list"></i>基本商品表</li>
            </ol>
          </div>
        </div>
        <!-- page start-->
        <div class="row">
          <div class="col-lg-12">
            <section class="panel">
              <!--点击跳转，添加页面-->
              <h2><a class="btn btn-sm btn-success" th:href="@{/pdt}">添加商品</a> </h2>
              <header class="panel-heading">
                商品列表
              </header>
              <div class="table-responsive">
                <table class="table">
                  <thead>
                    <tr>
                      <th>ID</th>
                      <th>名称</th>
                      <th>库存数量</th>
                      <th>计量单位</th>
                      <th>商品单价(RMB)</th>
                      <th>商品种类</th>
                      <th>生产日期</th>
                    </tr>
                  </thead>
                  <tbody>
                    <tr th:each="pdt:${pdts}">
                      <td th:text="${pdt.getId()}"></td>
                      <td th:text="${pdt.getName()}"></td>
                      <td th:text="${pdt.getNum()}"></td>
                      <td th:text="${pdt.getUnit()}"></td>
                      <td th:text="${pdt.getPrice()}"></td>
                      <td th:text="${pdt.getDepartment().getName()}"></td>
                      <td th:text="${pdt.getProdecedate()}"></td>
                      <td>
                        <!--返回链接包含对应id-->
                        <a class="btn btn-sm btn-primary" th:href="@{/pdt/}+${pdt.getId()}">编辑</a>
                        <a class="btn btn-sm btn-danger" th:href="@{/delpdt/}+${pdt.getId()}">删除</a>
                      </td>
                    </tr>
                  </tbody>
                </table>
              </div>

            </section>
          </div>
        </div>
        <!-- page end-->
      </section>
    </section>
    <!--main content end-->
    <div class="text-right">
      <div class="credits">
          <!--
            All the links in the footer should remain intact.
            You can delete the links only if you purchased the pro version.
            Licensing information: https://bootstrapmade.com/license/
            Purchase the pro version form: https://bootstrapmade.com/buy/?theme=NiceAdmin
          -->
          Designed by <a href="https://bootstrapmade.com/">BootstrapMade</a>
        </div>
    </div>
  </section>
  <!-- container section end -->
  <!-- javascripts -->
  <script src="js/jquery.js"></script>
  <script src="js/bootstrap.min.js"></script>
  <!-- nicescroll -->
  <script src="js/jquery.scrollTo.min.js"></script>
  <script src="js/jquery.nicescroll.js" type="text/javascript"></script>
  <!--custome script for all page-->
  <script src="js/scripts.js"></script>


</body>

</html>
